﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Superstore.Store.Models;

namespace Superstore.Store.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            return View();
        }

        public ActionResult IndexNone()
        {
            return View();
        }

        [HttpPost]
        public PartialViewResult GetMainMenuList(List<MenuInfo> main_menu_list, int mainTab, int subTab)
        {
            if (main_menu_list != null && main_menu_list.Count > 0)
            {
                ViewBag.mainMenuFocus = mainTab;
                ViewBag.subMenuFocus = subTab;
                return PartialView("GetMainMenuList", main_menu_list);
            }
            return PartialView("GetMainMenuList");
        }

        public PartialViewResult Shopping(List<ShoppingCartGoodsInfo> shoppingsList)
        {
            if (shoppingsList != null && shoppingsList.Count > 0)
            {
                return PartialView("Shopping", shoppingsList);
            }
            return PartialView("Shopping");
        }
    }
}